home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Communication / NewsBase / Source / INewsRc.h < prev    next >
Text File  |  1993-01-12  |  2KB  |  72 lines

  1. /*$Copyright:
  2.  * Copyright (C) 1992.5.22. Recruit Co.,Ltd. 
  3.  * Institute for Supercomputing Research
  4.  * All rights reserved.
  5.  * NewsBase  by ISR, Kazuto MIYAI, Gary ARAKAKI, Katsunori SUZUKI, Kok-meng Lue
  6.  *
  7.  * You may freely copy, distribute and reuse the code in this program under 
  8.  * following conditions.
  9.  * - to include this notice in the source code, if it is to be distributed 
  10.  *   with source code.
  11.  * - to add the file named "COPYING" within the code, which shall include 
  12.  *   GNU GENERAL PUBLIC LICENSE(*).
  13.  * - to display an acknowledgement in binary code as follows: "This product
  14.  *   includes software developed by Recruit Co.,Ltd., ISR."
  15.  * - to display a notice which shall state that the users may freely copy,
  16.  *   distribute and reuse the code in this program under GNU GENERAL PUBLIC
  17.  *   LICENSE(*)
  18.  * - to indicate the way to access the copy of GNU GENERAL PUBLIC LICENSE(*)
  19.  *
  20.  *   (*)GNU GENERAL PUBLIC LICENSE is stored in the file named COPYING
  21.  * 
  22.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  23.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  24.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  25. $*/
  26. /* INewsRc */
  27.  
  28. #import <objc/Object.h>
  29. #import <objc/objc.h>
  30. #import <sys/param.h>
  31.  
  32. typedef  enum  {Subscribe, UnSubscribe, NotExist} NewsStat;
  33. #define        LINE_BUF_MAXLEN        4088
  34.  
  35. @interface INewsRc:Object
  36. {
  37.     NXStream    *iFileStream;
  38.     char    iLineBuf[LINE_BUF_MAXLEN];
  39.     char    iNewsRcFileName[MAXPATHLEN];
  40.     NXZone    *istringTableZone;
  41.     id        istringTable;
  42. }
  43.  
  44. - initFile:(const char *)krcfile;
  45. /*
  46.  *  init and set filename of ".newsrc"
  47.  *    rcfile: newsrc file name. if "", use $HOME/.newsrc
  48.  *    return:    self
  49.  */
  50. - readRcfile;
  51. - (void)saveToRcfileFrom:knewsGroupTreeRoot;
  52. - (NewsStat)isSubscribe:(char *)newsgroupName;
  53. - setGroupInfo:kgroupInfo;
  54.  
  55.  
  56. //- readGroupInfo:sender;
  57. /* read and write groupInfo 
  58.    this method will be called from each node of ITreeNodeD
  59.  */
  60.  
  61. - (char *)_getLineGroup:(char *)kgroup;
  62. - (void)_writeToTableGroupInfo:kgroupInfo;
  63. - (void)_readRcfileAndSetGroupInfo:kgroupInfo;
  64. /*  set subscribe/nosubscribe and read article data("0-11,13,15-20...")
  65.  *  if name of news group is not, set subscribe and "0-(first-1)"
  66.  *    kgroupInfo: id of groupInfo
  67.  */
  68.  
  69. - free;
  70.  
  71. @end
  72.